from uu import encode

from charset_normalizer.constant import UTF8_MAXIMAL_ALLOCATION

# f =open('E:\\projects\\PycharmProjects\\bigdata33\\base\day5\\text1.txt',mode='ab')
# f.write('杨浩东最帅！\r\n'.encode('UTF-8'))
# f.close()
# f = open('E:\\projects\\PycharmProjects\\bigdata33\\base\\day5\\test2.txt',mode='w', encoding='UTF-8')
# # 写数据到文件中
# f.write('数加科技666！\r\n')
# f.close()
# f=open('E:\\projects\\PycharmProjects\\bigdata33\\base\\day5\\test2.txt',mode='a', encoding='UTF-8')
# # 写数据到文件中
# f.write('数加科技666！\n')
# f.close()
# f = open('E:\\projects\\PycharmProjects\\bigdata33\\base\\day5\\test2.txt',mode='rb')
# s1 = f.read()
# f.close()
# print(s1)
# while True:
#     name = input("请输入您的姓名：")
#     if name.upper() == 'Q':
#         break
#     pwd = input("请输入您的密码：")
#     email = input("请输入您的邮箱：")
#     infos = f"{name},{pwd},{email}\n"
#     f = open('E:\\projects\\PycharmProjects\\bigdata33\\data\\users.csv',mode='a',encoding='UTF-8')
#     f.write(infos)
#     f.close()
# f = open('E:\\projects\\PycharmProjects\\bigdata33\\data\\users.csv',mode='a',encoding='UTF-8')
# while True:
#     name = input("请输入您的姓名：")
#     if name.upper() == 'Q':
#         break
#     pwd = input("请输入您的密码：")
#     email = input("请输入您的邮箱：")
#     infos = f"{name},{pwd},{email}\n"
#     f.write(infos) # 这里的写实际上是往内存中写的
#     f.flush()
#     f.close() # 原则上是在关闭连接之前将内存的数据刷到磁盘中
# f = open('E:\\projects\\PycharmProjects\\bigdata33\\data\\jj.txt','a',encoding='UTF-8')
# for i in range(1, 10):
#     for j in range(1, i + 1):
#         f.write(f"{j}*{i}={i * j}\t")
#     f.write('\n')
#     f.flush()
#
# f.close()
# with open('E:\\projects\\PycharmProjects\\bigdata33\\data\\cars.csv', mode='r', encoding='UTF-8') as f:
